package com.jeasonzhao.report.exceptions;

import com.jeasonzhao.report.model.Report;
import com.jeasonzhao.report.msg.Message;

public abstract class ReportRuntimeException extends SQLReportException
{
    private static final long serialVersionUID = 1L;

    public ReportRuntimeException(Object ...objs)
    {
        super(objs);
    }

    public ReportRuntimeException(Throwable t,Object ...objs)
    {
        super(t,objs);
    }






    @Message(
        {"zh_cn","报表{0}动态参数脚本\"{1}\"分析错误,{2}"
        ,"en","Error occured when parse dynamic parameters for report {0}: \"{1}\",{2}"})
    public static class WrongDynamicParameterScript extends ReportRuntimeException
    {
        private static final long serialVersionUID = 1L;

        public WrongDynamicParameterScript(Report report
                                           ,String strScript
                                           ,Throwable t)
        {
            super(report
                  ,strScript
                  ,null==t?null:t.getMessage());
        }
    }

}
